<template>
	<div>
		<div class="graybg"></div>
		<div class="header header_bg">
			<div class="header_left">
				<i onclick="javascript:history.back(-1)" class="iconfont baiColor">&#xe612;</i>
			</div>
			<div class="header_center">
				<span class="baiColor">设置</span>
			</div>
		</div>

		<div class="center" style="padding-top: 47px;">
			<router-link :to="{name:'pass'}">
				<section>
	                <p class="pull-left">
	                	<i class="iconfont">&#xe64f;</i>
	                	<span>支付密码</span>
	                </p>
	                <p class="pull-right">
	                	<span class="info1">{{info1}}</span>
	                	<i class="iconfont">&#xe615;</i>
	                </p>
	            </section>
            </router-link>
      <!--<router-link :to="{name:'fuyinshezhi1'}">
        <section>
          <p class="pull-left">
            <i class="iconfont">&#xe681;</i>
            <span>复引设置</span>
          </p>
          <p class="pull-right">
            <span class="info1">{{info2}}</span>
            <i class="iconfont">&#xe615;</i>
          </p>
        </section>
      </router-link>-->
		</div>


	</div>

</template>

<script>
	export default {
		data() {
			return {
				info1:'',
        		info2:'已开启'
			}
		},
		 mounted(){
//		 	var info1 = document.getElementsByClassName('info1')[0].innerText;
        	var params = new URLSearchParams();
        	var info = window.localStorage.data;
        	params.append('token', info);	//客户秘钥（信息）
			var arr = ['u_alipay_pwd']
			params.append('arr', arr);
			this.$axios({
				url: "Home/Config/getUserField",
				method: "POST",
				data: params
			}).then((res) => {
				if(res.data.code == 1){
					//设置过密码
					if(res.data.data.u_alipay_pwd == true){
						this.info1 = '已设置'
					}else{
						this.info1 = '未设置'
					}
				}
			}).catch((err) => {
				console.log(err)
			});
			
			this.$axios({
		        url:'/One/Fun/afterQuote',
		        method:"GET",
		        params:{
		          token:info
		        }
		      }).then((res) => {
		        console.log(res)
		        if(res.data.status == 1){
		            if(res.data.data.u_aquote == 1){
		              console.log('开启')
		              this.info2 = '已开启'
		            }else{
		              console.log('关闭')
		              this.info2 = '已关闭'
		            }
		        }
		      }).catch((err) => {
		        console.log(err)
		      })

       },

	}
</script>

<style scoped="scoped">
	@import "../css/public.css";
	.center{
	width: 95%;
	margin: 0px auto;
}
.center section{
	overflow: hidden;
	color: #333;
	font-size: 18px;
	background: #fff;
	height: 44px;
	line-height: 44px;
	border-bottom: solid 0.5px #f0f0f0;
	/*padding: 13px 9px;*/
}
.center section p i{
	width: 22px;
	height: 21px;
}
.center section .pull-left i{
	padding: 0 10px;
	color: #F3961F;
}
.center section .pull-right{
	padding-right: 10px;
	color: #666;
	/*font-size: 15px;*/
}
.center section .pull-right i{
	width: 10px;
	height: 18px;
}
</style>
